
<div class="row">
	<div class="span8">
		<h3>Bộ sưu tập: </h3>
		<ul class="grid-layout">
			<?php if (sizeof($collections)): ?>
				<?php foreach ($collections as $collection): ?>
					<li>
						<a href="#">
							<?php if (strpos($collection->items->image, 'http') === 0): ?>
								<img title="<?php ?>" src="<?php echo $collection->items->image ?>" style="max-height: 83px"/>
							<?php else: ?>
								<img title="<?php ?>" src="<?php echo Yii::app()->request->baseUrl . '/' . $collection->items->image ?>"/>
							<?php endif; ?>
						</a>
						<div class="item-detail">
							<span class="ellipsis"><?php echo CHtml::encode($collection->items->title) ?></span>
							<span><a href="<?php echo $collection->items->link ?>" target="_blank" class="ellipsis">Chi tiết</a></span>
							<span><?php echo CHtml::encode($collection->items->price) ?></span>
							<span>
								Tags:
								<?php
								if (empty($tag_id))
								{
									$array = array();
									foreach ($collection->items->item_tags as $item_tag)
									{
										$array[] = $item_tag->tags->name;
									}
									echo implode(',', $array);
								}
								else
								{
									echo $items->item_tags[$tag_id]->tags->name;
								}
								?>
							</span>
						</div>
					</li>
				<?php endforeach; ?>
			<?php else: ?>
				<li>
					Không tìm thấy sản phẩm nào
				</li>
			<?php endif; ?>
		</ul>
		<div style="clear:both">&nbsp;</div>
		<div class="span810">
			<?php $this->widget('CLinkPager', array('pages' => $pages)); ?>	
		</div>
	</div>
</div>